package com.wbp.cms.qatest.service;

import javax.annotation.Resource;

import org.junit.Test;

import com.google.gson.Gson;
import com.wbp.cms.client.product.domain.ProductDO;
import com.wbp.cms.client.product.service.ProductService;
import com.wbp.cms.client.result.Result;
import com.wbp.cms.client.util.JsonUtils;
import com.wbp.cms.qatest.BaseTest;


/**
 * @Description: 
 * @Department:
 * @author andy.lhc
 * @date 2016年3月10日 下午11:42:39 
 */
public class ProductServiceTest  extends BaseTest{

  @Resource
  private  ProductService productService ;
  
  @Test
  public void test_query(){
    
    Result<ProductDO>  p = productService.loadProduct(1L) ;
    if(p.isSuccess()){
         System.out.println(JsonUtils.toJson(p, true));
         System.out.println(new Gson().toJson(p));
         System.out.println(JsonUtils.toJson( p.getData().getProductProfitList(),true) );
    }
    
    
  }
  
  
  
}
